/*
 * @Description: 单位导航包裹组件
 * @Author: Rfan
 * @Date: 2022-02-10 13:40:29
 * @LastEditTime: 2022-10-28 10:33:03
 */

import UFANav, { IUFAChangeCallback } from '@/components/UFANav';
import { useCallback } from 'react';
import { useAutoFilingContext } from '../contexts/AutoFilingContext';

const FondsSidebar = () => {
  const { setSelectFondId, setSelectAT, setSelectATId } = useAutoFilingContext();

  const navChange = ({ fondId, fondItem, atId, atItem }: IUFAChangeCallback) => {
    console.log('change', { fondId, fondItem, atId, atItem });
    setSelectFondId(fondId);
    setSelectAT(atItem);
    setSelectATId(atId);
  };

  return (
    <>
      <UFANav onChange={navChange} />
    </>
  );
};

export default FondsSidebar;
